﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TaskInStepListBatch.aspx.cs"
    Inherits="MyWindow_TaskInStepListBatch" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>待办事项列表（用于批量提交）</title>
    <link href="../css/page.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../ScriptFile/jquery.js"></script>
    <script type="text/javascript" src="../ScriptFile/jquery.easyui.min.js"></script>
    <script src="../ScriptFile/JqueryPostService.js" type="text/javascript"></script>
    <script type="text/javascript">
        function HandleWorkItem(WorkItem, iid, step) {
            var strURL = "../Office/TaskProcess.aspx?ItemId=" + WorkItem + "&iid=" + iid + "&step=" + encodeURI(step);
            window.open(strURL, '_blank', "height=" + (screen.availHeight - 30) + " , width=" + (screen.availWidth - 5) + ", top=0, left=0,toolbar=no, menubar=no, scrollbars=no, location=no, status=no");
        }
        function openRemark(IID) {
            var strURL = "MyWindow/listremark.aspx?flag=back&IID=" + IID;
            window.parent.openDivDlg("回退意见", strURL, 520, 270);
            //            window.open(strURL, 'newwindow', 'height=255, width=520, top=250, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')
        }

        //拷贝并添加
        function CopyAndAdd(strOldIID, strUserId) {
            //拷贝当前数据并新建
            WebService('../WebService/JqueryService.asmx/CopyAndAdd', RefreshPage, '{"strOldIid":"' + strOldIID + '","strUserId":"' + strUserId + '"}');
        }

        function RefreshPage(newUrl) {
            //newUrl = newUrl.substr(0, newUrl.indexOf("rdm=")); 
            window.location.href = newUrl + "?rdm=" + Math.random();
        }
    </script>
    <style type="text/css">
        td { white-space: nowrap; }
        .padLeft { text-align: left; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 100%; margin: 0px auto; text-align: center;">
        <table style="width: 100%; border-top-width: 0px" class="tab">
            <tr>
                <td>
                    受理编号<asp:TextBox ID="txtIID" runat="server" Width="120px"></asp:TextBox>
                    办件类型<asp:DropDownList ID="ddlFlow" runat="server">
                    </asp:DropDownList>
                    送审单位<asp:TextBox ID="txtName" runat="server" Width="120px"></asp:TextBox>
                </td>
                <td>
                    <asp:Button ID="btnRefer" CssClass="input" runat="server" Text="查询" OnClick="btnRefer_Click" />
                </td>
            </tr>
        </table>
        <div style="text-align:left">
            注：<img src="../images/top_ico_12.gif" />普通件 &nbsp;&nbsp;<img src="../images/top_ico_13.gif" />加急件
            &nbsp;&nbsp;<img src="../images/top_ico_14.gif" />特急件
            &nbsp;&nbsp;<span style="color:YellowGreen">预警</span>&nbsp;&nbsp;<span style="color:red">超期</span>&nbsp;&nbsp;<span style="text-decoration:underline; font:bold;">曾送审</span>
            </div>
        <controlDefine:CustomGridView runat="server" ID="gvSerial" SkinID="NewGrid" AutoGenerateColumns="false" CancelButtonStyle="display:none" 
            CompleteButtonText="批量提交" HideTextLength="20" ShowGridViewSelect="MultiSelect" 
            OnOnComplelteClick="gvSerial_OnComplelteClick" DivTrdClass-DivAllClass="padLeft"
            OnOnLoadData="gvSerial_OnLoadData" ShowHideColModel="None" AllowPaging="true"
            Width="2100" AllowOnMouseOverEvent="false" OnRowCreated="gvSerial_RowCreated">
            <Columns>
                <asp:TemplateField HeaderText="处理" ShowHeader="False" ItemStyle-Width="30px">
                    <ItemTemplate>
                        <a href="javascript:HandleWorkItem('<%#Eval("wiid")%>','<%#Eval("顺序号")%>','<%#Eval("所在岗位")%>')">
                            <img alt="" src="../images/tab_top_ico.gif" style="border: 0px" width="19" height="20" /></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="拷贝" ShowHeader="False" ItemStyle-Width="30px">
                    <ItemTemplate>
                         <a href="#" onclick="CopyAndAdd('<%#Eval("顺序号")%>','<%=UserId%>')">复制添加</a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="优先级" ItemStyle-Width="40px">
                    <ItemTemplate>
                        <img title="优先级" src="../images/<%#Getyou(Eval("优先级").ToString())%>" alt="优先级" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="顺序号" HeaderText="编号" />
                <asp:BoundField DataField="案件类型" HeaderText="办件类型" />
                <asp:BoundField DataField="所在岗位" HeaderText="当前岗位" />
                <asp:TemplateField HeaderText="前一用户">
                    <ItemTemplate>
                         <%#GetHuiTui(Eval("前一用户").ToString(),Eval("wiid").ToString(),Eval("isback").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="slbh" HeaderText="受理号" />
                <asp:BoundField DataField="sftg" HeaderText="审核状态" />
                <asp:BoundField DataField="单位名称" HeaderText="送审单位" />
                <asp:BoundField DataField="图名" HeaderText="图名" />
                <asp:BoundField DataField="图幅数量" HeaderText="图幅数" />
                <asp:BoundField DataField="规格" HeaderText="规格" />
                <asp:BoundField DataField="所有用途" HeaderText="申请用途" />
                <asp:TemplateField HeaderText="详细用途">
                    <ItemTemplate>
                        <a title="修改用途" style="cursor:pointer; color:blue;" onclick="window.open('ChgDtyt.aspx?dtyt=<%#Eval("dtyt")%>&iid=<%#Eval("顺序号")%>','修改用途','width=250,height=50')"><%#Eval("dtyt")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="审查应完成日期" HeaderText="审查应完成日期" DataFormatString="{0:yyyy-MM-dd}" />
                <asp:BoundField DataField="收件日期" HeaderText="收件日期" DataFormatString="{0:yyyy-MM-dd}" />
                <asp:BoundField DataField="受理日期" HeaderText="受理日期" DataFormatString="{0:yyyy-MM-dd}" />
                <asp:BoundField DataField="送交审查机构日期" HeaderText="送审日期" DataFormatString="{0:yyyy-MM-dd}" />
                <asp:BoundField DataField="联系人" HeaderText="联系人" />
                <asp:BoundField DataField="剩余工作日" HeaderText="剩余工作日" />
                <asp:TemplateField HeaderText="申请挂起">
                    <ItemTemplate>
                        <a href="suspend_apply.aspx?ID=<%#Eval("顺序号")%>&s_gwid=<%#Eval("wiid")%>&PageRedirect=../MyWindow/TaskInStepListBatch.aspx"><img alt="" src="../images/tab_end_ico.gif" style="border: 0px; width: 24px; height: 23px" /></a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </controlDefine:CustomGridView>
    </div>
    </form>
</body>
</html>
